[Liquid glass]: Modals#113
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0d83dfff0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| static func contentView(_ view: UIView, model: VM) { | ||
| view.backgroundColor = model.preferredBackgroundColor.uiColor | ||
| view.backgroundColor = model.preferredBackgroundColor?.uiColor |
There was a problem hiding this comment.
Keep effect backgrounds transparent when tinted
When backgroundStyle is .blur or .liquidGlass and callers also set backgroundColor, this line paints the whole contentView behind the UIVisualEffectView with that color. Because the effect view is then blurring/glassing a same-sized solid parent background instead of the presenting content, the UIKit modal no longer shows the content behind it; SwiftUI instead applies the color as a tint overlay. The filled background should be limited to .solid (or otherwise moved into the effect/tint layer) so tinted blur/glass stays translucent.
Useful? React with 👍 / 👎.
BackgroundStylesupport for modal backgroundsAlertVMinto the center modal implementation